<link type="text/css" rel="stylesheet" href="/public/js_calendar/dhtmlgoodies_calendar.css" media="screen"></LINK>
<script type="text/javascript" src="/public/js_calendar/dhtmlgoodies_calendar.js"></script>
<h2><?php echo $this->escape($this->content_title);?></h2>
<div class="form">
<form class="niceform"  action="/studentpayment/<?php echo $this->action; ?>/id/<?php echo $this->item->id; ?>" method="post">
 <input type="hidden" name="id" value="<?php echo $this->item->id; ?>" />
        <fieldset>
            <?php if(!empty($this->message)) :?>
            <dl id="message">
                <dt></dt>
                <dd><b style="color:red;"><?php echo $this->message;?></b></dd>
            </dl>
            <?php endif; ?>
            <dl>
                <dt><label for="id">Id</label></dt>
                <dd><?php echo $this->item->id; ?></dd>
            </dl>        
            <dl>
                <dt><label for="user_id">User id</label></dt>
                <dd>
                    <select id="user_id" name="user_id" size="1">
                        <?php foreach($this->user_ids as $obj) { ?> 
                        <option value="<?php echo $obj->id;?>" <?php echo $this->escape(trim($this->item->user_id))==$obj->id?' selected ':'';?>><?php echo $obj->last_name.' '.$obj->first_name;?></option>
                        <?php } ?>
                    </select>
                </dd>
            </dl>        
            <dl>
                <dt><label for="pdate">Payment date</label></dt>
                <dd><input type="text" size="10" id="pdate" name="pdate" value="<?php echo $this->escape(trim($this->item->pdate));?>">
                <img id="pdate_trigger" src="/public/images/cal.gif" style="padding:6px;" onclick="displayCalendar(document.getElementById('pdate'),'yyyy-mm-dd',this);"></dd>
            </dl>
            <dl>
                <dt><label for="amount">Amount</label></dt>
                <dd><input type="text" size="54" id="amount" name="amount" value="<?php echo $this->escape(trim($this->item->amount));?>"></dd>
            </dl>        
            <dl>
                <dt><label for="comment">Comment</label></dt>
                <dd><input type="text" size="54" id="comment" name="comment" value="<?php echo $this->escape(trim($this->item->comment));?>"></dd>
            </dl>        
            <dl>
                <dt><label for="invoice_id">Invoice</label></dt>
                <dd>
                    <select id="invoice_id" name="invoice_id" size="1">
                        <?php foreach($this->invoice_ids as $obj) { ?> 
                        <option value="<?php echo $obj->id;?>" <?php echo $this->escape(trim($this->item->invoice_id))==$obj->id?' selected ':'';?>><?php echo $obj->id.'. '.$obj->riskdate.' '.$obj->appointment;?></option>
                        <?php } ?>
                    </select>
                </dd>
            </dl>        
                   
         <dl class="submit">
            <a href="javascript:document.forms[0].submit();" class="bt_blue"><span class="bt_blue_lft"></span><strong>Save</strong><span class="bt_blue_r"></span></a>
            <a href="/studentpayment" class="bt_blue"><span class="bt_blue_lft"></span><strong>Cancel</strong><span class="bt_blue_r"></span></a>
         </dl>
    </fieldset>
        
 </form>
 </div>